package com.oig.sys.msg.dto;

import com.oig.common.validator.GroupAdd;
import com.oig.common.validator.GroupComplete;
import io.swagger.v3.oas.annotations.media.Schema;

import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@Schema
@Data
public class MqMsgDto {


	@Schema(description = "所属系统id")
	@NotNull(message = "参数错误,所属系统id不能为空", groups={GroupComplete.class})
	private Integer systemId;
	@Schema(description = "所属系统名称")
	@NotEmpty(message = "参数错误,所属系统名称不能为空", groups={GroupComplete.class})
	private String systemName;

	@Schema(description = "主业务类型")
	@NotEmpty(message = "参数错误,主业务类型不能为空", groups={GroupComplete.class})
	private String businessType;

	/**
	 * 先按关联单据类型来配置，不考虑系统和业务类型
	 */
	@Schema(description = "关联单据类型")
	@NotEmpty(message = "参数错误,关联单据类型不能为空", groups={GroupAdd.class,GroupComplete.class})
	private String relationType;
	@Schema(description = "关联单据id")
	@NotNull(message = "参数错误,关联单据id不能为空", groups={GroupAdd.class,GroupComplete.class})
	private String relationId;

	@Schema(description = "消息内容")
	@NotEmpty(message = "参数错误,消息内容不能为空", groups={GroupAdd.class,GroupComplete.class})
	private String msgContent;


	@Schema(description = "所属租户id")
//	@NotNull(message = "参数错误,所属租户id不能为空", groups={GroupAdd.class})
	private Integer tenantId;
	@Schema(description = "所属租户名称")
//	@NotEmpty(message = "参数错误,所属租户名称不能为空", groups={GroupAdd.class})
	private String tenantName;

}
